package com.academic_system.mapper;


import com.academic_system.model.Student;
import com.academic_system.model.Teacher;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 用户
 *
 * @author Y-Rainson
 * @create 2018-03-16 15:15
 **/

@Repository
public interface UserDao {
    @Select("select * from student where stu_num= #{username} and stu_password = #{password};")
    List<Student> loginStu(@Param("Tname") String Tname, @Param("username") String userName, @Param("password") String userPassword);

    @Select("select * from teacher where te_num = #{username} and te_password = #{password};")
    List<Teacher> loginTch(@Param("Tname") String Tname, @Param("username") String userName, @Param("password") String userPassword);

}
